"""
Author: LYh
Description: OK
"""
import json

def read_json_file(file_path):
    try:
        with open(file_path, 'r', encoding='utf-8') as file:
            data = json.load(file)
    except FileNotFoundError:
        print(f"错误：文件 {file_path} 未找到。")
    except json.JSONDecodeError:
        print("错误：文件内容不是有效的JSON格式。")
    except Exception as e:
        print(f"读取文件时发生错误：{e}")

    # 使用json.dumps()方法格式化输出内容，ensure_ascii=False保证非ASCII字符正常显示
    # data = json.dumps(data, ensure_ascii=False, indent=2)
    return data


if __name__ == "__main__":
    print(read_json_file('../json_cough/cough.json'))